<?php
/**
 * @package    Joomla.Tutorials
 * @subpackage Components
 * @link http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_2
 * @license    GNU/GPL
*/
 
// No direct access
 
defined( '_JEXEC' ) or die( 'Restricted access' );
 
jimport( 'joomla.application.component.view');
 
/**
 * HTML View class for the JobsWorld Component
 *
 * @package    JobsWorld
 */
 
class JobsViewJobdetail extends JView
{
    function display($tpl = null)
    {
		global $mainframe, $option;
       // $model = &$this->getModel();
		
		$jobid =  JRequest::getVar( 'jid','','get' );  
		
		JModel::addIncludePath(JPATH_ROOT.'/components/com_jobs/models', 'myjobs');
		$items_job = JModel::getInstance( 'myjobs', 'JobsModel');
		
		$row = $items_job->getDetailJob($jobid);
		$row_pris = $items_job->getPrisJob($row->catid);
		$land = $items_job->getNameCityDanish($row->postcode);		
		$land1 = $items_job->getNameCityDanish($row->postcode1);
		$this->assignRef( 'row_pris',	$row_pris );
		$this->assignRef( 'row',	$row );
		$this->assignRef( 'land',	$land );
		$this->assignRef( 'land1',	$land1 );
		
		
		/*
		$items		= $this->get('data');
		$total		= $this->get('total');
		$pagination	= &$this->get('pagination');
		
		$mainframe->setUserState($option.'filter_state','P');
		$mainframe->setUserState($option.'filter_order_Dir','DESC');
		
		$this->assignRef( 'items',	$items );
		$this->assignRef( 'total',	$total );
		$this->assignRef( 'pagination',	$pagination );
		$this->assignRef( 'model',	$model );
		*/
		/*
		$rows = $model->getListJobs($model->getState('limitstart'), $model->getState('limit'));
		$this->assignRef( 'rows',	$rows );
		$rows_total = $model->getTotalJobs();
		
		$pagination	= $model->getPagination($rows_total);
		$this->assignRef( 'pagination',	$pagination );
		$this->assignRef( 'model',	$model );
		*/
		
		/*
        $greeting = $model->getGreeting();
        $this->assignRef( 'greeting',	$greeting );
 		*/
		
		
        parent::display($tpl);
    }
}
?>